package com.coolw.spring.listener;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.stereotype.Service;

/**
 * OrderService
 *
 * @author coolw
 * @date 2024/5/8 19:10
 */
@Service
public class OrderService {

    @Autowired
    private ApplicationContext context;

    public void publishOrderEvent(String orderId) {
        context.publishEvent(new OrderEvent(orderId));
    }
}
